<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>发送邀请码</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="assets/layui/css/layui.css">
	<link rel="stylesheet" href="assets/css/all.css" />
</head>
<body class="add-new-account">
	<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
	<!--[if lt IE 9]>
		  <script src="assets/js/html5.min.js"></script>
		  <script src="assets/js/respond.min.js"></script>
		<![endif]-->
<form class="layui-form" action="">
	<div class="layui-form-item">
		<label class="layui-form-label">邀请码:</label>
		<div class="layui-input-inline">
			<input id="" type="text" name="" autocomplete="off" class="layui-input" value="11DF11" disabled>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">邮箱地址</label>
		<div class="layui-input-block">
			<input id="mailAddress" type="text" name="" lay-verify="required|mailAddress" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">手机号码</label>
		<div class="layui-input-block">
			<input id="mailAddress" type="text" name="" lay-verify="required|phoneNum" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item" style="text-align:center;margin-top:30px;">
		<button type="button" class="layui-btn" lay-submit="">发送</button>
		<button class="layui-btn">取消</button>
	</div>
</form>
	<script src="assets/layui/layui.js"></script>
	<script src="assets/js/jquery-2.1.0.js"></script>
	<script type="text/javascript" src="assets/js/all.js"></script>
	<script>
		layui.use(['form', 'element', 'table'], function() {
			var element = layui.element,
				form = layui.form,
				layer = layui.layer,
				$ = layui.$;
			form.verify({
				mailAddress: function(value) {
					var re = /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/;
					if(!re.test(value)) {
						layer.msg('您输入的电子邮件地址不合法');						
					}					
				},
				phoneNum: function(value) {
					var rephone = /^1\d{10}$/;
					if(!rephone.test(value)) {
						layer.msg('您输入的手机号码不合法');						
					} 
				}
			});
		});
	</script>
</body>
</html>
